#include <iostream>
#include <vector>

#include <omp.h>

int main(int argc, char** argv)
{
    std::cout<< "Max number of threads = " << omp_get_num_threads() << std::endl;
    omp_set_num_threads(4);
    std::cout<< "Current number of threads = " << omp_get_num_threads() << std::endl;

#pragma omp parallel
    {
        std::cout << "Hello, World!" << std::endl;
        std::cout << "I am thread " << omp_get_thread_num() << "of = " << omp_get_num_threads() << std::endl;
    }

    std::vector<int> a(100, 0);
    std::vector<int> b(100, 1);
    std::vector<int> c(100, 2);
    int i=0;
#pragma omp parallel for
    for(i=0; i<100; i++){
        a[i] = b[i] + c[i];
    }

    return 0;
}
